package ru.bragnikita.utils.swing.widget.field;

/**
 * @author Nikita.Brazhnikov
 */
public abstract class AbstractField implements Field {

    private String name;

    private int length = 0;

    private String id;

    public AbstractField(String id, String name) {
        this(name);
        this.id = id;
    }

    public AbstractField(String name) {
        this.name = name;
        this.id = name;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public int getLength() {
        return length;
    }

    public String getId() {
        return id;
    }

    public void setLength(int length) {
        this.length = length;
    }
}
